package com.science.slam.response;

import lombok.Getter;

@Getter
public class BasicResponse<T> {
    Integer code;
    String message;
    T data;

    public BasicResponse(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static <T> BasicResponse<T> success(T data) {
        return new BasicResponse<>(0, "成功", data);
    }
}
